/*
 *  cocoa/factory.cpp
 *  mini
 *
 *  Created by jin on 1/1/11.
 *  Copyright 2011 __MyCompanyName__. All rights reserved.
 *
 */

#include "cocoa/factory.h"

#include "app.h"
#include "cocoa/appImp.h"
#include "cocoa/windowImp.h"
#include <memory>

Factory& Factory::Instance()
{
    static std::auto_ptr<Factory> s_factory(new CocoaFactory);
    return *(s_factory.get());
}

CocoaFactory::~CocoaFactory()
{
}

AppImpBase* CocoaFactory::CreateAppImp(AppBase* app)
{
    return new CocoaAppImp(app);
}

WindowImpBase* CocoaFactory::CreateWindowImp(Window* win)
{
    return new CocoaWindowImp(win);
}


